public class Test {
    public static void main(String[] args) {
        Integer a = 100;
        Integer b = 100;
        Integer.valueOf(1);
        System.out.println(a == b);
        a = 1;//-> a.valueOf(1) 而不是 a.xxx = 1
        System.out.println(b);
        System.out.println("------------");
        Test1 test1 = new Test1();
        test1.a = 1;
        Test1 test2 = test1;
        test2.a = 2;
        System.out.println(test2 == test1);
        System.out.println(test1.a);
    }
    public static void main2(String[] args) {
        Integer a = 1;
        int b = a.intValue();//手动拆箱
        int c = a;//自动拆箱
        double d = a.doubleValue();
        System.out.println(a);
        System.out.println(b);
        System.out.println(c);
        System.out.println(d);
    }
    public static void main1(String[] args) {
        int a = 1;
        Integer b = a;
        Integer c = Integer.valueOf(a);//手动装箱
        System.out.println(a);
        System.out.println(b);
        System.out.println(c);
        Integer aa = 1;//自动装箱
    }
}

class Test1 {
    public int a;
}
